/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Microsoft
 * Date: 2022-11-27
 * Time: 20:10
 */
abstract class Shape {
    public abstract void draw();
}
class Rect extends Shape {
    @Override
    public void draw() {
        System.out.println("画矩形");
    }
}
class Cycle extends Shape {
    @Override
    public void draw() {
        System.out.println("⚪形");
    }
}
class Flower extends Shape {
    @Override
    public void draw() {
        System.out.println("❀!");
    }
}

public class Test {
    public static void drawMap(Shape shape) {
        shape.draw();
    }

    public static void main(String[] args) {
        Shape[] shapes = {new Cycle(),new Flower()};
        for (Shape shape:shapes) {
            shape.draw();
        }
    }
}
